Platform Explorer / Nuxeo Platform 5.8

Component org.nuxeo.ecm.wall.gadgets

Contributions

XML Source

<?xml version="1.0"?>
<component name="org.nuxeo.ecm.wall.gadgets" version="1.0">

  <extension target="org.nuxeo.opensocial.gadgets.service" point="gadget">

    <internalGadget name="wall" disabled="false">
      <documentation>
        This gadget displays a Wall for a given document
        (document created / modified, messages, ...)

        The following user preferences can be used to configure it:
        - nuxeoTargetContextPath: the path of the document on which to
        initialize the wall
        - activityStreamName: the activity stream to use to retrieve the
        configured list of activity verbs to get

        How to include the wall gadget in a JSF context:
        <code>
          <div class="gadget-wall threeQuarterWidth"></div>
          <script type="text/javascript">
            jQuery('.gadget-wall').openSocialGadget({
              baseURL: '#{baseURL}',
              language: '#{localeSelector.language}',
              gadgetDefs: [
                { specUrl: '#{gadgetsBaseURL}/site/gadgets/wall/wall.xml',
                  title: '',
                  userPrefs: {
                    nuxeoTargetContextPath: {
                      value: '#{currentDocument.pathAsString}'
                    },
                    activityStreamName: {
                      value: 'defaultWallActivityStream'
                    }
                  },
                  displayTitleBar: false,
                  width: '100%'
                }
              ]
            });
          </script>
        </code>

        How to include the wall gadget in a WebEngine page:
        <code>
          <link rel="stylesheet" href="${contextPath}/css/opensocial/light-container-gadgets.css" />
          <script type="text/javascript" src="${contextPath}/opensocial/gadgets/js/rpc.js?c=1"></script>
          <script type="text/javascript" src="${contextPath}/js/?scripts=jquery.js|opensocial/cookies.js|opensocial/util.js|opensocial/gadgets.js|opensocial/cookiebaseduserprefstore.js|opensocial/jquery.opensocial.gadget.js"></script>

          <div class="gadget-wall gadgets-gadget-chrome"></div>
          <script type="text/javascript">
            $('.gadget-wall').openSocialGadget({
              baseURL: '${contextPath}' + '/',
              language: '${Context.locale.language}',
              gadgetDefs: [{
                specUrl : '${Runtime.getProperty('nuxeo.loopback.url')}/site/gadgets/wall/wall.xml',
                userPrefs: {
                  nuxeoTargetContextPath: {
                    value: '${doc.pathAsString}'
                  },
                  activityStreamName: {
                    value: 'defaultWallActivityStream'
                  }
                },
                displayTitleBar: false,
                width: '100%'
              }]
            });
          </script>
        </code>
      </documentation>

      <mountPoint>/wall</mountPoint>
      <entryPoint>wall.xml</entryPoint>
      <category>Nuxeo</category>
      <icon>gadget-wall.png</icon>
    </internalGadget>

  </extension>

</component>